package com.ruoyi.project.manhua.Enum;


import java.util.HashMap;
import java.util.Map;

public class mistakeEnum {


    /*爬取网站类型*/
    public enum  STATUS{

        html("1","获取篇章，html代码错误"),
        MYCHAPTER("2","数据库，没有插入篇章错误"),
        PAPAGE("3","爬取，篇章图片空"),
        PAGE("4","爬取，篇章图片连接空"),
        ;

        private String key;

        private String value;


        public String getKey() {
            return key;
        }

        public String getValue() {
            return value;
        }

        STATUS(String key, String value) {
            this.key = key;
            this.value = value;
        }

        /*返回所有类型*/
        public static Map<String,String> toAll(){
            Map<String,String> map = new HashMap<>();
            for (STATUS type : STATUS.values()){
                map.put(type.getKey(),type.getValue());
            }
            return map;
        }

    }

}
